package com.hqj.controller;

import com.hqj.entity.User;
import com.hqj.service.UserServiceImpl;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/uc")
public class UserController {

    @Resource(name="userServiceImpl")
    private UserServiceImpl usi;


    @RequestMapping("/find")
    public List<String> find(){
        List<String> list = new ArrayList<>();
        list.add("abc");list.add("123");

        return list;
    }

    @RequestMapping("/test")
    public String sayTest(){
        return "我是mysql服务提供者";
    }

    @RequestMapping("/findUser")
    public List<User> findUser(){
        List<User> list = usi.find(new User());

        return list;
    }
}
